package apache

import (
	"github.com/apache/rocketmq-client-go/v2"
	"testkjcld.bhecard.com/gitlab/kit/esim/rocketmq/internal"
)

type ApacheMQTranProducer struct {
	rocketmq.TransactionProducer
	TopicName string
	GroupName string
}

// PublishMessage 发送消息.
func (p *ApacheMQTranProducer) PublishMessage(message internal.PublishMessageRequest) (internal.PublishMessageResponse, error) {
	return internal.PublishMessageResponse{}, nil
}

// ConsumeHalfMessage 消费事务半消息.
func (p *ApacheMQTranProducer) ConsumeHalfMessage(respChan chan internal.ConsumeMessageResponse, errChan chan error, numOfMessages int32, waitseconds int64) {
}

// Commit 提交事务消息.
func (p *ApacheMQTranProducer) Commit(receiptHandle string) (err error) {
	return
}

// Rollback 回滚事务消息.
func (p *ApacheMQTranProducer) Rollback(receiptHandle string) (err error) {
	return
}
